<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="user/login" method="post">
	用户名：<input type="text" id="loginName" name="loginName"> <br><br>
	密   码：<input type="text" id="password" name="password"> <br><br>
	<input type="button" id="submit" value="提交">
</form>
</body>
<script type="text/javascript" src="resource/js/common/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="resource/js/util/jQuery.md5.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
	$("#submit").click(function() {
		var url = 'user/login';
		var args = {
				userId : 1,
				loginName : 'qwert',
				password : $.md5('111111')
		};
		$.post(url, args, function(data) {
			if(data.result == 'SUCCESS') {
				window.location.href='go/main';
				//请求访问Main
			} else {
				alert("账号或密码错误！");
			}
		},'json');
	});
})
</script>
</html>